//
//  ViewController.m
//  SmartTalk
//
//  Created by 陈勃 on 14-12-19.
//  Copyright (c) 2014年 gameabc. All rights reserved.
//

#import "ViewController.h"
#import "NetWorkManager.h"
#import "NSObject+JSON.h"
#import "loginViewController.h"
@interface ViewController ()

@end

@implementation ViewController

-(void)connect
{
    [[NetWorkManager sharedInstance] connect];
}



-(IBAction)regAction:(id)sender
{
    NSDictionary *dic  = @{@"name":namefield.text,@"pwd":pwdfield.text,@"phone":@"15012345678",@"action":@(0x010001)};
    [[NetWorkManager sharedInstance] sendContent:[dic JSONRepresentation]];

}

-(IBAction)loginAction:(id)sender
{

    NSDictionary *dic  = @{@"name":namefield.text,@"pwd":pwdfield.text,@"action":@(0x010002)};
    [[NetWorkManager sharedInstance] sendContent:[dic JSONRepresentation]];
}


- (void)viewDidLoad {
    [self connect];
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
